package com.example.administrator.waitan.login;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.example.administrator.waitan.R;
import com.example.administrator.waitan.base.BaseActivity;
import com.example.administrator.waitan.login.forgetaccount.ForgetAccountActivity;
import com.example.administrator.waitan.login.register.RegisterActivity;
import com.example.administrator.waitan.main.MainActivity;

/**
 * Created by Administrator on 2016/1/11.
 */
public class LoginActivity extends BaseActivity implements View.OnClickListener {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        findViewById(R.id.btn_login_login).setOnClickListener(this);
        findViewById(R.id.btn_reg).setOnClickListener(this);
        findViewById(R.id.btn_login_forget).setOnClickListener(this);
    }
    @Override
    public void onClick(View view) {
        switch(view.getId()){
            case R.id.btn_login_login:
                Intent intent = new Intent(this, MainActivity.class);
                startActivity(intent);
                break;
            case R.id.btn_reg:
                Intent goRister = new Intent(this, RegisterActivity.class);
                startActivityForResult(goRister,2);
                break;
            case R.id.btn_login_forget:
                Intent goForget = new Intent(this, ForgetAccountActivity.class);
                startActivity(goForget);
                break;
        }

    }
}
